function [ValueFirst,ValueLast,ValueAffiliation,ValueORCID,n2]=ExtractAuthor(ValueTemp,nTemp,ValueChoice)

ValueFirst='';
ValueLast='';
ValueAffiliation='';
ValueORCID='';
n1=1;
n2=0;
TestTemp=0;
while n1<=size(ValueTemp,2)-3&&TestTemp==0
    if strcmp(ValueTemp(1,n1:n1+3),'*N_*')==1
        n2=n2+1;
        if n2==nTemp&&ValueChoice==2
            TestTemp=1;
            n1=n1+3;
            while strcmp(ValueTemp(1,n1:n1+3),'*N_*')==0
                if strcmp(ValueTemp(1,n1:n1+3),'/L_/')==1
                    n4=n1+4;
                    n1=n1+3;
                    while n1<=size(ValueTemp,2)&&strcmp(ValueTemp(1,n1:n1+3),'/L_/')==0
                        n1=n1+1;
                    end
                    ValueLast=ValueTemp(1,n4:n1-1);
                end
                if strcmp(ValueTemp(1,n1:n1+3),'/F_/')==1
                    n4=n1+4;
                    n1=n1+3;
                    while n1<=size(ValueTemp,2)&&strcmp(ValueTemp(1,n1:n1+3),'/F_/')==0
                        n1=n1+1;
                    end
                    ValueFirst=ValueTemp(1,n4:n1-1);
                end
                if strcmp(ValueTemp(1,n1:n1+3),'/A_/')==1
                    n4=n1+4;
                    n1=n1+3;
                    while n1<=size(ValueTemp,2)&&strcmp(ValueTemp(1,n1:n1+3),'/A_/')==0
                        n1=n1+1;
                    end
                    ValueAffiliation=ValueTemp(1,n4:n1-1);
                end
                if strcmp(ValueTemp(1,n1:n1+3),'/D_/')==1
                    n4=n1+4;
                    n1=n1+3;
                    while n1<=size(ValueTemp,2)&&strcmp(ValueTemp(1,n1:n1+3),'/D_/')==0
                        n1=n1+1;
                    end
                    ValueORCID=ValueTemp(1,n4:n1-1);
                end
                n1=n1+1;
            end
        end
    end
    n1=n1+1;
end
n2=n2-1;
    